<?
function drizzo_user_info() {
	drizzo_db_connect();
	
	global $drizzo_users;
	
	$session_user_enc = $_COOKIE['drizzo_user'];

	$result = @mysql_query("SELECT * FROM `$drizzo_users` WHERE `username_md5`='$session_user_enc'");
	if($result) {
		while ($row = mysql_fetch_array($result)) {
			$session_username = $row['username'];
			$session_user = md5($row['username']);
			$session_pass = md5($row['password']);
			$session_user_level = $row['user_level'];
			$session_first_name = $row['first_name'];
			$session_user_id = $row['ID'];
			define("session_user_id", $session_user_id);
			define("session_user_first_name", $session_first_name);
			define("session_user_level", $session_user_level);
			define("session_username", $session_username);
			return true;
		}
	} else {
		return false;
	}
}
?>